<template>
	<view class="page">
		<!-- 店铺简介 wwl -->
		
		<view class="brief_introduction">
			<block v-if="personalProfileObj.info">
				<view class="row row1"  v-if="type ==  2">
					<view class="title">设计理念</view>
					<view class="center">
						{{personalProfileObj.info.sj_ln}}
					</view>
				</view>
				<view class="row row1" v-if="type ==  2">
					<view class="title">擅长风格</view>
					<view class="center center1">
						{{personalProfileObj.info.sc_fg}}
					</view>
				</view>
				<view class="row row1"  v-if="personalProfileObj.info.gr_cj">
					<view class="title">个人成就</view>
					<view class="center center1">
						{{personalProfileObj.info.gr_cj}}
					</view>
				</view>
				<view class="row row1" v-if="personalProfileObj.info.jq_zp">
					<view class="title">近期作品</view>
					<view class="center center1">
						{{personalProfileObj.info.jq_zp}}
					</view>
				</view>
				<!-- <view class="row">
					<view class="title">执业证书</view>
					<view class="img" v-if="personalProfileObj.info.zy_zs && personalProfileObj.info.zy_zs.length > 0">
						<image :src="ic" mode="scaleToFill" v-for="(ic,i) in  personalProfileObj.info.zy_zs" :key='i'></image>
						
					</view>
				</view> -->
			</block>
			<empty  :status='2' v-else/>
		</view>

	</view>
</template>

<script>
	import  { getDesignerCraftsmanShopInfo, getGoodsList,getGZGoodsList,getShopPersonalProfile,getConstructionSite ,setDesignList } from "./static/api.js"
	
	export default {
		
		data() {
			return {
				title: '',
				list:[],
				page: 1,
				size: 10,
				total: 0,
				loading: false,
				type:'',
				shopping_id:0,
				users_id:0,
				personalProfileObj:{
					isFirst:true,
					info:null,
					loading:false
				},
			}
		},
		methods: {
			
			async getPersonalProfileObj(){
				uni.showLoading()
				try{
					var res = await getShopPersonalProfile(
					{
						users_id:this.users_id,
						shopping_id:this.shopping_id,
						type:this.type
					}) //1工长店铺    2设计师店铺  3建材城店铺
					console.log(res,'查询店铺简介')
					if(res.type){
						this.personalProfileObj.info = res
					}
					
					// if( Object.prototype.toString.call(res) == '[object Object]'){
					// 	this.personalProfileObj.info = res
					// 	this.personalProfileObj.isFirst = true
					// }
					uni.hideLoading()
				}catch{
					uni.hideLoading()
				}
			}
		},
		onLoad(params) {
			this.shopping_id = params.shopping_id
			this.users_id = params.users_id
			this.type = params.shoptype
			this.getPersonalProfileObj()
		}
	}
</script>

<style lang="scss" scoped>
	page {
		width: 100%;
		min-height: 100%;
		display: flex;
		background-color: #fff;
	}
	
	.brief_introduction{
		padding: 0 22px;
		    box-sizing: border-box;
		    width: 100%;
		    min-height: 30vh;
		
		.row1{
			background: #F7F8FA;
			    border-radius: 5px;
			    padding: 10px 10px;
		}
		.row{
			margin-bottom: 40rpx;
			.title{
				font-size: 32rpx;
				line-height: 24rpx;
				color:#000000;
				margin-bottom: 20rpx;
				font-weight: 600;
			}
			.center{
				margin-top: 20rpx;
				font-size: 28rpx;
				color:#000;
				line-height: 52rpx;
			}
			.center1{
				background: #E7E7E7;
				    border-radius: 5px;
				    padding: 2px 6px;
			}
			.img{
				margin-top: 46rpx;
				width: 100%;
				image{
					height: 298rpx;
					margin-bottom: 32rpx;
					&:last-child{
						margin-bottom: 0;
					}
				}
			}
			&:last-child{
				margin-bottom: 0;
			}
		}
	}

	.page {
		background-color: #fff;
		flex: 1;
		display: flex;
		flex-direction: column;
		overflow: hidden;
		height: 100vh;
	}
	.select_box{
		position: relative;
		padding: 20rpx 36rpx;
		width: 100%;
		box-sizing: border-box;
		.select_text2{
			width: 100%;
			height: 66rpx;
			background: #f8faff;
			border-radius: 34rpx;
			font-size: 28rpx;
			line-height: 40rpx;
			color:#333;
			text-align: center;
			padding: 0 26rpx ;
			box-sizing: border-box;
		}
		.select_text1{
			font-size: 28rpx;
			line-height: 40rpx;
			color:#ADADAD;
			position: absolute;
			left: 50%;
			top:50%;
			transform: translate(-50%,-50%);
			display: flex;
			justify-content: center;
			align-items: center;
			image{
				width: 40rpx;
				height: 40rpx;
			}
			
		}
	}
	.list_box {
		padding: 0 36rpx;
		box-sizing: border-box;
		width: 100%;
		min-height: 60vh;
	}
</style>
